@ECHO OFF & CD /D %~DP0 & TITLE
>NUL 2>&1 REG.exe query "HKU\S-1-5-19" || (
    ECHO SET UAC = CreateObject^("Shell.Application"^) > "%TEMP%\Getadmin.vbs"
    ECHO UAC.ShellExecute "%~f0", "%1", "", "runas", 1 >> "%TEMP%\Getadmin.vbs"
    "%TEMP%\Getadmin.vbs"
    DEL /f /q "%TEMP%\Getadmin.vbs" 2>NUL
    Exit /b
)

taskkill /f /im WSHelper* >NUL 2>NUL
taskkill /f /im PDFelement* >NUL 2>NUL

start /wait /B "" "%~dp0FileAssociation.exe" /UnInstallFileUnAssociate

rd/s/q "%ProgramData%\Wondershare" 2>NUL
rd/s/q "%AppData%\Wondershare\PDFelement 6 Pro" 2>NUL
rd/s/q "%AllUsersProfile%\Application Data\Wondershare"2>NUL
rd/s/q "%LOCALAPPDATA%\Wondershare"2>NUL
rd/s/q "%USERPROFILE%\Local Settings\Wondershare"2>NUL
del /q "%userprofile%\Desktop\万兴PDF编辑器.lnk" >NUL  2>NUL 
del /q "%userprofile%\桌面\万兴PDF编辑器.lnk" >NUL  2>NUL 
reg delete "HKCU\SOFTWARE\Wondershare" /f >NUL 2>NUL
reg delete "HKLM\SOFTWARE\Wondershare" /f >NUL 2>NUL
reg delete "HKLM\SOFTWARE\Wow6432Node\Wondershare" /f >NUL 2>NUL
reg delete "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Run" /f /v "Wondershare Helper Compact.exe" >NUL 2>NUL
reg delete "HKLM\SOFTWARE\WOW6432Node\Microsoft\Windows\CurrentVersion\Run" /f /v "Wondershare Helper Compact.exe" >NUL 2>NUL

ECHO. &ECHO 卸载完成！&PAUSE >NUL 2>NUL & EXIT